// simple fragment shader simple.frag
#version 150

precision highp float;
 
uniform sampler2D first_output;		// The image output from cel.frag
uniform sampler2D o_lay;

out vec4 fColor;
 
void main(void)
{ 
	vec2 coords;
	coords.x = gl_FragCoord.x / 800;
	coords.y = gl_FragCoord.y / 600;

	vec4 tex_color;

	if(gl_FragCoord.x > 25 && gl_FragCoord.x < 775)
	{
		if(gl_FragCoord.y > 75 && gl_FragCoord.y < 575)
		{
			tex_color = texture2D(first_output, coords);
		}
		else
		{
			tex_color = texture2D(o_lay, coords);
		}
	}
	else
	{
		tex_color = texture2D(o_lay, coords);
	}
	
	fColor = tex_color;
}
